@import "../../variable";

.field {
  opacity: 1;
}

.label {
  cursor: pointer;
  color: @primary-color;

  &:hover {
    text-decoration: underline;
    //border-bottom: 1px solid;
  }
}

:global {
  .ui-tpl-root {
    .field-item {
      margin-bottom: 0;

      .ant-form-item-extra {
        margin-bottom: 0;
      }

      .ant-form-item-explain {
        position: absolute;
        top: 100%;
        left: 0;
        max-width: 100%;
        z-index: 3;
        background-color: #fff;
        padding: 0;
        //color: @error-color;
        height: auto;
        margin: 0;
      }

      .ant-form-item-control {
        flex: 1 1;

        //@media (max-width: 575px) {
        //  & {
        //    flex-basis: auto;
        //  }
        //}
      }

      .ant-form-item-control-input, .ant-form-item-control-input-content {
        height: 100%;
        align-items: start;
      }
    }
  }

  .ant-form-item-control-input, .ant-form-item-control-input-content {
    // 表单项的显示样式
    .form-item-text {
      display: inline-flex;
      align-items: center;
      width: 100%;
      height: 100%;
      min-height: 28px;;
      word-break: break-word;
      border-bottom: 1px solid rgb(222, 222, 222);
      background: rgb(255, 255, 255);
      overflow: hidden;
    }
  }

  .field-item {
    text-align: left;

    .ant-form-item-explain, .ant-form-item-extra {
      margin-bottom: 0;
    }

    &.ant-row { // 不换行
      flex-wrap: nowrap;

      @media (max-width: 575px) {
        & {
          flex-wrap: wrap;
        }
      }
    }

    .ant-form-item-label {
      flex-grow: 0;
      padding: 0;
      //width: 90px;
      overflow: hidden;
      //min-width: 90px;

      // * 号
      > label.ant-form-item-required::before {
        display: none;
        content: none;
      }

      > label.ant-form-item-required > span::before {
        display: inline-block;
        margin-right: 2px;
        color: #ff4d4f;
        font-size: 12px;
        font-family: SimSun, sans-serif;
        line-height: 1;
        content: '*';
      }
    }

    .ant-form-item-control {
      flex: 1 1;
    }

    &.check-group {
      .ant-form-item-control-input-content {
        height: auto;
      }
    }

    .ant-input-group.ant-input-group-compact > * {
      vertical-align: middle;
    }

    .ant-select-selection-item {
      white-space: unset;
      word-break: break-all;
    }

  }

  .field-item, .ant-table-cell {

    .ant-picker, .ant-picker-range, .ant-input-number {
      width: 100%;
    }
  }
}